<?php
class Admin_View_Helper_TableSelect extends Zend_View_Helper_Abstract
{
	public function tableSelect(array $tables, Zend_View_Abstract $view)
	{
		$select = array();
		foreach ($tables as $table) {
			$url=$view->url(array(	'module'=>'admin',
									'controller'=>'crud',
									'action'=>'list',
									'table'=>$table,
									'language'=>Zend_Registry::get('Zend_Translate')->getLocale()));
			$select[$url]=$table;
		}

		return $view->formSelect('table',null,null,$select);
	}
}
